<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="/layout/admin_template.xhtml">

    <ui:define name="body">
    	<h:form>
    		<h:commandButton value="#{messages.add_msg}" action="e_color" immediate="true"/>    		
    		<rich:dataTable id="ut_id" value="#{kColorListManager.colorList}" var="e">
    			<rich:column>
    				<f:facet name="header">
    					<h:outputText value="#{messages.id_msg}" />
    				</f:facet>
    				<h:commandLink action="#{kColorListManager.edit(e.id)}" value="#{e.id}" title="#{messages.edit_msg}" immediate="true" />
    			</rich:column>
    			<rich:column>
    				<f:facet name="header">
    					<h:outputText value="#{messages.code_msg}" />
    				</f:facet>
    				<h:commandLink action="#{kColorListManager.edit(e.id)}" title="#{messages.edit_msg}" immediate="true" >
    					<div >
			   				<h:outputText value="#{e.code}" />
			   				<div style="border: 1px solid #EEEEEE;width:50px;height:20px;background:#{e.code}" />
		   				</div>
    				</h:commandLink>
    			</rich:column>
    			<rich:column>
    				<f:facet name="header">
    					<h:outputText value="#{messages.name_msg}" />
    				</f:facet>
    				<h:commandLink action="#{kColorListManager.edit(e.id)}" value="#{e.getName(klang)}" title="#{messages.edit_msg}" immediate="true" />
    			</rich:column>
    			<rich:column>
    				<f:facet name="header">
    					<h:outputText value="#{messages.do_msg}" />
    				</f:facet>
    				<a:commandLink action="#{kColorListManager.delete(e)}" reRender="ut_id" >
    					<h:graphicImage value="/img/cross.png" title="#{messages.delete_msg}" />
    				</a:commandLink>
    			</rich:column>
    		</rich:dataTable>
    	</h:form>
    </ui:define>
</ui:composition>
